package com.kly.smartbi.manager;

import cn.hutool.core.io.resource.ResourceUtil;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author admin
 * @date 2025/3/30
 */
@Component
public class AllKindsAIManager {

    @Resource
    private QwenChatManager qwenChatManager;


    /**
     * Prompt工程师
     *
     * @param message
     * @return
     */
    public String promptMaster(String message) {
        String prompt = ResourceUtil.readUtf8Str("prompt_master.txt");
        return qwenChatManager.chatWithQwen(message, prompt, "qwen-plus");
    }

    /**
     * 全栈工程师
     * @param message
     * @return
     */
    public String fullStackEngineer(String message) {
        String prompt = ResourceUtil.readUtf8Str("full_stack_engineer.txt");
        return qwenChatManager.chatWithQwen(message, prompt, "qwen-plus");
    }

    /**
     * UML大师
     * @param message
     * @return
     */
    public String plantUmlMaster(String message) {
        String prompt = ResourceUtil.readUtf8Str("plant_uml_master.txt");
        return qwenChatManager.chatWithQwen(message, prompt, "qwen-plus");
    }

    /**
     * 普通AI
     */
    public String commonAi(String message) {
        String prompt = "You are a helpful assistant.";
        return qwenChatManager.chatWithQwen(message, prompt, "qwen-max");
    }
}
